package com.woniuxy.jiapei.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class LvFeiLongDateUtils {

    private static String dateStr = "yyyy-MM-dd'T'HH:mm:ss.SSS Z";

    public static Date[] parseDateStrType(String startDate, String endDate) throws ParseException {
        String[] selectDate = {startDate, endDate};
        Date[] dates = new Date[2];
        String newCreateTime = null;
        for (int i = 0; i < selectDate.length; i++) {
            if (selectDate[i] != null) {
                newCreateTime = selectDate[i].replace("Z", " UTC");
                SimpleDateFormat format = new SimpleDateFormat(dateStr);
                Date createDate = format.parse(newCreateTime);
                dates[i] = createDate;
            }
        }
        return dates;
    }

}
